package com.wantup.mapper;

import com.wantup.entity.TblUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Zhaoluowei
 * @version 1.0
 * @date 日期 2019/6/18 11:38
 */
@Mapper
@Repository
public interface TblUserMApper {

    //查询所有用户信息
    @Select("SELECT id,username,password FROM tbl_user")
    public List<TblUser> findAll();

    //保存用户信息
    @Insert("INSERT INTO tbl_user(username,password) VALUES(#{tblUser.username},#{tblUser.password})")
    public int saveUesrInfo(@Param("tblUser") TblUser tblUser);

}
